/*
 * @Author: ZWS
 * @Date: 2022-01-24 10:47:38
 * @LastEditTime: 2022-02-26 13:53:20
 * @Description: vue路由配置文件
 */
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import LayoutIndex from '@/layout/LayoutIndex.vue'
import HomePage from '@/views/home-page/HomePage.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Main',
    component: LayoutIndex,
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: 'Home',
        component: HomePage
      },
      {
        path: 'code-base',
        name: 'CodeBase',
        component: () => import('@/views/code-base/CodeBase.vue')
      },
      {
        path: 'admin-skin',
        name: 'AdminSkin',
        component: () => import('@/views/admin-skin/AdminSkin.vue')
      },
      {
        path: 'drop-component',
        name: 'DropComponent',
        component: () => import('@/views/drop-component/DropComponent.vue')
      },
      {
        path: 'tools',
        name: 'Tools',
        component: () => import('@/views/tools-web/ToolsWeb.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
